package com.jk.controller;

import com.jk.entity.TreeEntity;
import com.jk.service.TreeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

@RestController
public class TreeController {
    @Autowired
    private TreeService treeService;

    @RequestMapping("getTree")
    public List<TreeEntity> getTree(Integer pid){
        return  treeService.getTree(pid);
    }

    @RequestMapping("login")
    public String login(String num, String pwd, HttpServletRequest request){

        return treeService.login(num,pwd,request);

    }

}
